@extends('layout.main')

@section('content')
<div class="row">
    <div class="col-lg-12">
        <div class="ibox float-e-margins">
            <div>
                <form id="form" method="post" class="form-horizontal" action="/ios/typeadd">
	                <div class="form-group"><label class="col-sm-2 control-label">父级名称</label>
                        <div class="col-sm-10"><p class="form-control-static">{{$ptype->name}}</p></div>
                    	<input type="hidden" name="pid" value="{{$ptype->id}}" class="form-control">
                    </div>

                    <div class="hr-line-dashed"></div>

                    <div class="form-group"><label class="col-sm-2 control-label">名称</label>
                        <div class="col-sm-10"><input type="text" name="name" class="form-control"></div>
                    </div>
                   	

                    <div class="hr-line-dashed"></div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">排序</label>
                        <div class="col-sm-10">
                            <label class="checkbox-inline">
                                <input name="sort" type="checkbox" value="1" >
                                热门
                            </label>
                        </div>
                    </div>
                    
                   	<div class="hr-line-dashed"></div>

                    <div class="form-group"><label class="col-sm-2 control-label">状态</label>

                        <div class="col-sm-10">
                            <div>
                            <label><input type="radio" name="status_at" checked="checked" value="1" >启用</label>
                            <label><input type="radio" name="status_at" value="0">禁用</label>
                            </div>
                        </div>
                    </div>
                    
                    <div class="hr-line-dashed"></div>
                   {!! csrf_field() !!}
                    <div class="form-group">
                        <div class="col-sm-4 col-sm-offset-2">
                            <button class="btn btn-white" type="reset">取消</button>
                            <button class="btn btn-primary" type="submit">保存</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
@endsection

@section('js')
<script type="text/javascript">
$(document).ready(function(){
    $("#form").validate({
        rules: {
            name: {
                required: true
            }
        },
        messages: {
            name: "请填写名称"
        }
    });
});
</script>
@endsection